package in.careerscale.apps.ocms.dao.model;

// Generated Jul 8, 2013 11:21:48 PM by Hibernate Tools 4.0.0

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CaseApprovalHistory generated by hbm2java
 */
@Entity
@Table(name = "case_approval_history", catalog = "ocms")
public class CaseApprovalHistory implements java.io.Serializable {

	private Integer id;
	private CaseStatusMaster caseStatusMaster;
	private CaseMaster caseMaster;
	private LoginMaster loginMaster;
	private String reason;
	private Date approvalDate;

	public CaseApprovalHistory() {
	}

	public CaseApprovalHistory(CaseMaster caseMaster, LoginMaster loginMaster) {
		this.caseMaster = caseMaster;
		this.loginMaster = loginMaster;
	}

	public CaseApprovalHistory(CaseStatusMaster caseStatusMaster,
			CaseMaster caseMaster, LoginMaster loginMaster, String reason,
			Date approvalDate) {
		this.caseStatusMaster = caseStatusMaster;
		this.caseMaster = caseMaster;
		this.loginMaster = loginMaster;
		this.reason = reason;
		this.approvalDate = approvalDate;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "approval_status_id")
	public CaseStatusMaster getCaseStatusMaster() {
		return this.caseStatusMaster;
	}

	public void setCaseStatusMaster(CaseStatusMaster caseStatusMaster) {
		this.caseStatusMaster = caseStatusMaster;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "case_id", nullable = false)
	public CaseMaster getCaseMaster() {
		return this.caseMaster;
	}

	public void setCaseMaster(CaseMaster caseMaster) {
		this.caseMaster = caseMaster;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "login_id", nullable = false)
	public LoginMaster getLoginMaster() {
		return this.loginMaster;
	}

	public void setLoginMaster(LoginMaster loginMaster) {
		this.loginMaster = loginMaster;
	}

	@Column(name = "reason", length = 500)
	public String getReason() {
		return this.reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "approval_date", length = 19)
	public Date getApprovalDate() {
		return this.approvalDate;
	}

	public void setApprovalDate(Date approvalDate) {
		this.approvalDate = approvalDate;
	}

}
